--
-- Author: shineflag
-- Date: 2018-01-18 17:24:53
-- 测试功能或一些数据操作
local skynet = require "skynet"
require "skynet.manager"
local json = require("json")
local log = require("log")
local sconf = require("server_conf")


local TAG = "TEST"


local function expire_ubinfo()
	local keypre = "ubinfo_"
	local expire = 3600*24*2 
	local dbdata = skynet.uniqueservice("test/dbdata")

	skynet.send(dbdata, "lua", "expire_all_keypre",keypre, expire)
end

local function expire_ginfo()
	local keypre = "ginfo_"
	local expire = 3600*24*2 
	local dbdata = skynet.uniqueservice("test/dbdata")

	skynet.send(dbdata, "lua", "expire_all_keypre",keypre, expire)
end

local function delkeys(keypre)
	local dbdata = skynet.uniqueservice("test/dbdata")
	skynet.send(dbdata, "lua", "del_all_keypre",keypre)
end

skynet.start(function()
	--delkeys("ubinfo_")
	--expire_ubinfo()
	expire_ginfo()
end)

